<div class="slider">
	<div class="sliderbtn prev"></div>
	<div class="container">
		<?php 
			foreach( $products as $p ) : 
			$link = "href='/produkt/".$p->id."'"; 
		?>

			<div class="item">
				<img src="<?php echo $p->image; ?>" />
				<a <?=$link;?> >
					<span class="title">
						<?php echo strlen($p->offer_text)>0? $p->offer_text : $p->namn;?>
					</span>
					<span class="price">
						<?php echo strlen($p->offer_price)>0? $p->offer_price : $p->pris;?> kr
					</span>
				</a>
			</div>

		<?php endforeach; ?> 
	</div>
	<div class="sliderbtn next"></div>
</div>
<script language="javascript" type="text/javascript">
	( function( $ ){

		var el = $(".slider");
		var slider = new TwifySlider( el );

	} ( jQuery ));
</script>